//
//  ManyListenListView.m
//  NewMusic
//
//  Created by dllo on 15/11/18.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "ManyListenListView.h"

@interface ManyListenListView ()
//全部播放
@property(nonatomic, retain) UILabel *showLabel;
//换一批
@property(nonatomic, retain) UILabel *changeLabel;
@end

@implementation ManyListenListView
- (void)dealloc {
    [_showButton release];
    [_showLabel release];
    [_changeButton release];
    [_changeLabel release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        //创建视图
        [self createSubView];
    }
    return self;
}
#pragma mark 创建视图
-(void)createSubView {
    //背景图片
    self.backView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
    _backView.backgroundColor = [UIColor blackColor];
    _backView.alpha = 0.7;
    [self addSubview:_backView];
    [_backView release];
    //全部播放
    self.showButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.showButton.frame = CGRectMake((self.frame.size.width - 60) / 3, 5, 30, self.frame.size.height - 25);
    //    self.showButton.backgroundColor = [UIColor redColor];
    [self.showButton setImage:[UIImage imageNamed:@"icon_bofang3"] forState:UIControlStateNormal]; ;
    [self addSubview:self.showButton];
    
    self.showLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.showButton.frame.origin.x - 15 , self.showButton.frame.origin.y + self.showButton.frame.size.height + 3, self.showButton.frame.size.width + 30, 15)];
    //    self.showLabel.backgroundColor = [UIColor purpleColor];
    self.showLabel.textAlignment = NSTextAlignmentCenter;
    self.showLabel.font = [UIFont systemFontOfSize:15];
    self.showLabel.textColor = [UIColor whiteColor];
    self.showLabel.text = @"全部播放";
    [self addSubview:self.showLabel];
    [self.showLabel release];
    //换一批
    self.changeButton = [UIButton buttonWithType:UIButtonTypeCustom];
    self.changeButton.frame = CGRectMake(self.showButton.frame.origin.x + self.showButton.frame.size.width + (self.frame.size.width - 60) / 3, self.showButton.frame.origin.y, self.showButton.frame.size.width, self.showButton.frame.size.height);
    [self.changeButton setImage:[UIImage imageNamed:@"icon_huanyipi"] forState:UIControlStateNormal]; ;
    //    self.changeButton.backgroundColor = [UIColor cyanColor];
    [self addSubview:self.changeButton];
    
    self.changeLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.changeButton.frame.origin.x - 15, self.changeButton.frame.origin.y + self.changeButton.frame.size.height + 3, self.showLabel.frame.size.width, self.showLabel.frame.size.height)];
    //    self.changeLabel.backgroundColor = [UIColor orangeColor];
    self.changeLabel.font = [UIFont systemFontOfSize:15];
    self.changeLabel.text = @"换一批";
    self.changeLabel.textColor = [UIColor whiteColor];
    self.changeLabel.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.changeLabel];
    [self.changeLabel release];
   }

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
